package com.blue.seata.business.config;

import com.netflix.loadbalancer.BaseLoadBalancer;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import feign.Logger;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ribbon负载均衡策略自定义:IRule的实现类即所有策略
 *
 * @author liulei
 * @version 1.0
 */
@Configuration
//@RibbonClient(name = "business",configuration = RoundRobinRule.class)
public class RibbonConfiguration {

//    @Bean
//    public IRule ribbonRule(){
//        // 轮询策略[可以定义服务轮询的起始位置]
//        return new RoundRobinRule(new BaseLoadBalancer());
//    }

}
